package com.bjsxt.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bjsxt.pojo.PageResult;
import com.bjsxt.pojo.Planer;
import com.bjsxt.service.IPlanerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-02-22
 */
@Controller
@RequestMapping("/planer")
public class PlanerController {
    //声明业务层属性
    @Autowired
    private IPlanerService planerService;
    //声明单元方法：加载公司策划师数据
    @ResponseBody
    @RequestMapping("planerInfo")
    public PageResult<Planer> planerInfo(String cid){
        //处理请求
            //创建条件构造器
        QueryWrapper<Planer> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("cid",cid);
        List<Planer> list = planerService.list(queryWrapper);
        //响应结果
        return new PageResult<Planer>(0L         ,list);
    }
}

